package cn.com.greatwall.system.modules.oauth2.service;

import javax.sql.DataSource;

import org.springframework.security.oauth2.provider.client.JdbcClientDetailsService;

/**
 * @Author herw
 * @Time 2020-10-24 17:07:58
 * @Version 1.0
 * @Description: TODO(用一句话描述该文件做什么)
 */
public class CustomJdbcClientDetailsService extends JdbcClientDetailsService {
    private static final String SELECT_CLIENT_DETAILS_SQL = "select client_id, client_secret, resource_ids, scope, authorized_grant_types, web_server_redirect_uri, authorities, access_token_validity, refresh_token_validity, additional_information, autoapprove from oauth_client_details where client_id = ?";

    public CustomJdbcClientDetailsService(DataSource dataSource) {
        super(dataSource);
        setSelectClientDetailsSql(SELECT_CLIENT_DETAILS_SQL);
    }
}
